﻿' LibWowArmory
' by Ronald M. Clifford (roncli@roncli.com)
' ItemTooltip classes contributed by Lukan Schwigtenberg (sepai69@gmail.com)
'
' This source code is released under the GNU Library General Public License (LGPL) Version 2.1.

Namespace roncliProductions.LibWowArmory.Item.Tooltip

    ''' <summary>
    ''' A class that encapsulates item source information
    ''' </summary>
    ''' <remarks></remarks>
    Public Class ItemSource

        ''' <summary>
        ''' The identification number of the area the item can be found in
        ''' </summary>
        ''' <value></value>
        ''' <returns></returns>
        ''' <remarks></remarks>
        Public Property AreaId As Integer

        ''' <summary>
        ''' The name of the area the item can be found in
        ''' </summary>
        ''' <value></value>
        ''' <returns></returns>
        ''' <remarks></remarks>
        Public Property AreaName As String

        ''' <summary>
        ''' The identification number of the creature the item drops from
        ''' </summary>
        ''' <value></value>
        ''' <returns></returns>
        ''' <remarks></remarks>
        Public Property CreatureId As Integer

        ''' <summary>
        ''' The name of the creature the item drops from
        ''' </summary>
        ''' <value></value>
        ''' <returns></returns>
        ''' <remarks></remarks>
        Public Property CreatureName As String

        ''' <summary>
        ''' The difficulty of the area the item is found in
        ''' </summary>
        ''' <value></value>
        ''' <returns></returns>
        ''' <remarks></remarks>
        Public Property Difficulty As String

        ''' <summary>
        ''' The estimated drop rate of the item
        ''' </summary>
        ''' <value></value>
        ''' <returns></returns>
        ''' <remarks></remarks>
        Public Property DropRate As Enums.DropRateType

        ''' <summary>
        ''' The required level of the quest the item is a reward from
        ''' </summary>
        ''' <value></value>
        ''' <returns></returns>
        ''' <remarks></remarks>
        Public Property RequiredLevel As Integer

        ''' <summary>
        ''' The source of the item
        ''' </summary>
        ''' <value></value>
        ''' <returns></returns>
        ''' <remarks></remarks>
        Public Property Source As Enums.SourceType

        ''' <summary>
        ''' A constructor to create new item source information
        ''' </summary>
        ''' <param name="intAreaId"></param>
        ''' <param name="strAreaName"></param>
        ''' <param name="intCreatureId"></param>
        ''' <param name="strCreatureName"></param>
        ''' <param name="strDifficulty"></param>
        ''' <param name="drDropRate"></param>
        ''' <param name="strSource"></param>
        ''' <remarks></remarks>
        Public Sub New(ByVal intAreaId As Integer, ByVal strAreaName As String, ByVal intCreatureId As Integer, ByVal strCreatureName As String, ByVal strDifficulty As String, ByVal drDropRate As Enums.DropRateType, ByVal intRequiredLevel As Integer, ByVal strSource As String)
            AreaId = intAreaId
            AreaName = strAreaName
            CreatureId = intCreatureId
            CreatureName = strCreatureName
            Difficulty = strDifficulty
            DropRate = drDropRate
            RequiredLevel = intRequiredLevel
            Select Case strSource
                Case "sourceType.createdByPlans"
                    Source = Enums.SourceType.CreatedByPlans
                Case "sourceType.createdBySpell"
                    Source = Enums.SourceType.CreatedBySpell
                Case "sourceType.creatureDrop"
                    Source = Enums.SourceType.CreatureDrop
                Case "sourceType.currency"
                    Source = Enums.SourceType.Currency
                Case "sourceType.factionReward"
                    Source = Enums.SourceType.FactionReward
                Case "sourceType.creatureHerb"
                    Source = Enums.SourceType.Herbalism
                Case "sourceType.creatureMine"
                    Source = Enums.SourceType.Mining
                Case "sourceType.gameObjectDrop"
                    Source = Enums.SourceType.ObjectDrop
                Case "sourceType.pickPocket"
                    Source = Enums.SourceType.Pickpocketing
                Case "sourceType.planForItem"
                    Source = Enums.SourceType.Plans
                Case "sourceType.pvpReward"
                    Source = Enums.SourceType.PvpReward
                Case "sourceType.vendorPvP"
                    Source = Enums.SourceType.PvpRewardVendor
                Case "sourceType.objQuest"
                    Source = Enums.SourceType.QuestObjective
                Case "sourceType.providedQuest"
                    Source = Enums.SourceType.QuestProvidedItem
                Case "sourceType.questReward"
                    Source = Enums.SourceType.QuestReward
                Case "sourceType.startsQuest"
                    Source = Enums.SourceType.QuestStartingItem
                Case "sourceType.reagentSpell"
                    Source = Enums.SourceType.Reagent
                Case "sourceType.creatureSkin"
                    Source = Enums.SourceType.Skinning
                Case "sourceType.vendor"
                    Source = Enums.SourceType.Vendor
                Case "sourceType.worldDrop"
                    Source = Enums.SourceType.WorldDrop
                Case Else
                    Source = Enums.SourceType.None
            End Select
        End Sub

    End Class

End Namespace
